ISCPersistenceUnit Interface
The following table contains information on the ISCPersistenceUnit interface:
Signature |
Description |
Valid Arguments |
---|---|---|
VARIANT_BOOL Save(VARIANT Locator [optional], VARIANT Disposition [optional] |
Persists model data to external storage |
Locator:
Disposition: Specifies changes in access attributes, such as read only. |
Example 26
The following example illustrates how to save a model using C++. The example uses a Persistence Unit object from Example 5:
void Save( ISCPersistenceUnitPtr & scPUnitPtr ) { ISCPropertyBagPtr propBag = scPUnitPtr->GetPropertyBag ("Locator"); long index = 0; _bstr_t bstrFileName = propBag->GetValue(COleVariant(index)); // Change bstrFileName to a new location scPUnitPtr->Save(bstrFileName); }
The following example illustrates how to save a model using Visual Basic .NET. The example uses a Persistence Unit object from Example 5:
Public Sum Save( scPUnit As SCAPI.PersistenceUnit ) Dim propBag as SCAPI.PropertyBag propBag = scUnit.PropertyBag(�Locator�) Dim sFileName As String sFileName = propBag.Value(�Locator�) sFileName = sFileName + �.bak� scPUnit.Save(sFileName ) End Sub
Copyright © 2025 Quest Software, Inc. |